package a.f.l.a;

import a.c.e;
import a.c.q;
import a.c.v;
import a.c.w;
import a.c.x;
import a.c.y;
import a.c.z;
import a.d.m;
import a.d.p;
import a.d.t;
import a.i.db;

import java.util.*;

public class l
  implements ib, k
{
  private static final double a = 1.0E-006D;
  private static final h_ b = new h_();
  private static final i_ d = new i_();
  private mb e;
  private q f;
  private x g;
  private Map h;
  private Map i;
  private Map j;
  private Map k;
  private double l = 8.0D;
  private double m = 2.0D;
  private double o = 2.0D;
  private List p = new ArrayList();
  public static int q;
  
  public double c()
  {
    return this.l;
  }
  
  public void a(double paramDouble)
  {
    this.l = paramDouble;
  }
  
  public double d()
  {
    return this.m;
  }
  
  public void b(double paramDouble)
  {
    this.m = paramDouble;
  }
  
  public double e()
  {
    return this.o;
  }
  
  public void c(double paramDouble)
  {
    this.o = paramDouble;
  }
  
  public void a(k.a_ parama_)
  {
    this.p.add(parama_);
  }
  
  public void b(k.a_ parama_)
  {
    this.p.remove(parama_);
  }
  
  protected void a(mb parammb, List paramList)
  {
    boolean bool = sb.e;
    int n = sb.d;
    if ((bool) || (!this.p.isEmpty()))
    {
      Iterator localIterator = this.p.iterator();
      do
      {
        if (!localIterator.hasNext()) {
          break;
        }
        k.a_ locala_ = (k.a_)localIterator.next();
        locala_.a(parammb, paramList);
      } while (n == 0);
    }
  }
  
  protected void b(mb parammb)
  {
    boolean bool = sb.e;
    int n = sb.d;
    if ((bool) || (!this.p.isEmpty()))
    {
      Iterator localIterator = this.p.iterator();
      do
      {
        if (!localIterator.hasNext()) {
          break;
        }
        k.a_ locala_ = (k.a_)localIterator.next();
        locala_.b(parammb);
      } while (n == 0);
    }
  }
  
  protected void d(mb parammb)
  {
    boolean bool = sb.e;
    int n = sb.d;
    if ((bool) || (!this.p.isEmpty()))
    {
      Iterator localIterator = this.p.iterator();
      do
      {
        if (!localIterator.hasNext()) {
          break;
        }
        k.a_ locala_ = (k.a_)localIterator.next();
        locala_.a(parammb);
      } while (n == 0);
    }
  }
  
  public void a(List paramList, t paramt)
  {
    boolean bool = sb.e;
    int n = sb.d;
    if (!bool)
    {
      if (this.f == null)
      {
        this.f = new q();
        this.h = new HashMap();
        this.k = new HashMap();
        this.i = new HashMap();
        this.j = new HashMap();
      }
      this.g = db.a();
    }
    e locale = this.f.i();
    this.e = new mb(paramt, this);
    this.g.a(locale, this.e);
    this.h.put(this.e, locale);
    z localz1 = new z(paramList);
    localz1.a(new Comparator()
    {
      public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
      {
        return (int)(((hb)paramAnonymousObject1).a().d() - ((hb)paramAnonymousObject2).a().d());
      }
    });
    z localz2 = new z(paramList);
    localz2.a(new Comparator()
    {
      public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
      {
        return (int)(((hb)paramAnonymousObject1).a().e() - ((hb)paramAnonymousObject2).a().e());
      }
    });
    this.k.put(this.e, new e_(this.e, false, localz1, localz2));
    Iterator localIterator = paramList.iterator();
    do
    {
      if (!localIterator.hasNext()) {
        break;
      }
      ArrayList localArrayList = new ArrayList();
      localArrayList.add(this.e);
      this.j.put(localIterator.next(), localArrayList);
      if ((!bool) && (n != 0)) {
        return;
      }
    } while (n == 0);
    if (!bool) {
      d(this.e);
    }
  }
  
  private boolean a(mb parammb, z paramz)
  {
    int n = sb.d;
    y localy = paramz.h();
    do
    {
      if (!localy.e()) {
        break;
      }
      hb localhb = (hb)localy.j();
      if (n != 0) {
        break label59;
      }
      if (!a(localhb, parammb)) {
        return true;
      }
      localy.f();
    } while (n == 0);
    label59:
    return false;
  }
  
  private boolean a(hb paramhb, mb parammb)
  {
    boolean bool = sb.e;
    t localt1 = paramhb.a();
    t localt2 = parammb.h();
    if (((bool) || (localt2.d() > localt1.d() - 1.0E-006D)) && ((bool) || (localt2.d() + localt2.b() < localt1.d() + localt1.b() + 1.0E-006D)) && ((bool) || (localt2.e() > localt1.e() - 1.0E-006D))) {
      if (bool) {}
    }
    return localt2.e() + localt2.c() < localt1.e() + localt1.c() + 1.0E-006D;
  }
  
  public void a()
  {
    boolean bool = sb.e;
    int n = sb.d;
    if ((bool) || (this.e != null))
    {
      Iterator localIterator = a(false).iterator();
      if (localIterator.hasNext()) {}
      do
      {
        mb localmb = (mb)localIterator.next();
        localmb.a();
        if ((!bool) && (n != 0)) {
          break label121;
        }
        if (n == 0) {
          break;
        }
        this.e = null;
        this.f.o();
        this.h.clear();
        this.k.clear();
        this.i.clear();
      } while (bool);
      this.j.clear();
      label121:
      this.g = null;
    }
  }
  
  private void e(mb parammb)
  {
    boolean bool = sb.e;
    int n = sb.d;
    e_ locale_1 = (e_)this.k.get(parammb);
    if (!bool) {
      if (locale_1.c) {
        return;
      }
    }
    z localz1 = locale_1.d;
    z localz2 = locale_1.e;
    t localt1 = parammb.h();
    f_ localf_1 = a(localz1, localt1, b);
    f_ localf_2 = a(localz2, localt1, d);
    if (!bool) {
      if (localf_2.c <= localf_1.c)
      {
        d1 = localf_2.a;
        localObject1 = new z();
        localObject2 = new z();
        a(localz1, d, d1, (z)localObject1, (z)localObject2);
        localObject3 = new z();
        localObject4 = new z();
        a(localz2, d, d1, (z)localObject3, (z)localObject4);
        localt2 = new t(parammb.i(), parammb.j(), parammb.m(), d1 - parammb.j());
        localmb1 = a(parammb, (z)localObject1, (z)localObject3, localt2);
        localt3 = new t(parammb.i(), d1, parammb.m(), parammb.l() - d1);
        localmb2 = a(parammb, (z)localObject2, (z)localObject4, localt3);
        if (bool) {
          break label399;
        }
        if (n == 0) {
          break label412;
        }
      }
    }
    double d1 = localf_1.a;
    Object localObject1 = new z();
    Object localObject2 = new z();
    a(localz1, b, d1, (z)localObject1, (z)localObject2);
    Object localObject3 = new z();
    Object localObject4 = new z();
    a(localz2, b, d1, (z)localObject3, (z)localObject4);
    t localt2 = new t(parammb.i(), parammb.j(), d1 - parammb.i(), parammb.n());
    mb localmb1 = a(parammb, (z)localObject1, (z)localObject3, localt2);
    t localt3 = new t(d1, parammb.j(), parammb.k() - d1, parammb.n());
    label399:
    mb localmb2 = a(parammb, (z)localObject2, (z)localObject4, localt3);
    label412:
    e_ locale_2 = (e_)this.k.get(localmb1);
    e_ locale_3 = (e_)this.k.get(localmb2);
    if (!bool) {
      if (locale_2.b)
      {
        locale_3.g.add(localmb1);
        if (bool) {
          break label498;
        }
        if (n == 0) {
          break label493;
        }
      }
    }
    locale_3.h.add(localmb1);
    label493:
    label498:
    if (!bool) {
      if (locale_3.b)
      {
        locale_2.g.add(localmb2);
        if ((!bool) && (n == 0)) {
          break label542;
        }
      }
    }
    locale_2.h.add(localmb2);
    label542:
    localObject1 = new ArrayList(locale_1.g.size() + locale_1.h.size());
    ((List)localObject1).addAll(locale_1.g);
    ((List)localObject1).addAll(locale_1.h);
    localObject2 = ((List)localObject1).iterator();
    if (((Iterator)localObject2).hasNext()) {}
    while (bool)
    {
      localObject3 = (mb)((Iterator)localObject2).next();
      localObject4 = (e_)this.k.get(localObject3);
      ((e_)localObject4).h.remove(parammb);
      if (n == 0) {
        break;
      }
    }
    localObject2 = localz1.h();
    if (((y)localObject2).e()) {}
    do
    {
      localObject3 = (hb)((y)localObject2).j();
      localObject4 = (List)this.j.get(localObject3);
      ((List)localObject4).remove(parammb);
      ((y)localObject2).f();
      if (bool) {
        break label753;
      }
      if (n != 0) {
        break label752;
      }
      if (n == 0) {
        break;
      }
      locale_1.a();
    } while (bool);
    locale_1.c = true;
    label752:
    label753:
    localObject2 = Arrays.asList(new mb[] { localmb1, localmb2 });
    a(parammb, (List)localObject2);
    if (!bool) {
      if (locale_2.b) {
        b(localmb1);
      }
    }
    if (locale_3.b) {
      b(localmb2);
    }
  }
  
  private void a(z paramz1, g_ paramg_, double paramDouble, z paramz2, z paramz3)
  {
    boolean bool = sb.e;
    int n = sb.d;
    y localy = paramz1.h();
    do
    {
      if (!localy.e()) {
        break;
      }
      hb localhb = (hb)localy.j();
      t localt = localhb.a();
      if (!bool) {
        if (paramg_.a(localt) < paramDouble - 1.0E-006D) {
          paramz2.add(localhb);
        }
      }
      if (!bool)
      {
        if (paramg_.c(localt) > paramDouble + 1.0E-006D) {
          paramz3.add(localhb);
        }
        localy.f();
      }
    } while (n == 0);
  }
  
  private f_ a(z paramz, t paramt, g_ paramg_)
  {
    boolean bool = sb.e;
    int i4 = sb.d;
    double d1 = paramg_.a(paramt);
    double d2 = paramg_.c(paramt);
    double d3 = paramg_.d(paramt);
    double d4 = paramg_.f(paramt);
    double d5 = 0.0D;
    double d6 = 1.7976931348623157E+308D;
    int n = paramz.size();
    int i1 = 0;
    int i2 = 0;
    int i3 = n;
    z localz = new z();
    y localy = paramz.h();
    double d8;
    label262:
    label330:
    label332:
    label341:
    label358:
    do
    {
      double d9;
      v localv;
      do
      {
        if (!localy.e()) {
          break label429;
        }
        break label358;
        hb localhb = (hb)localy.j();
        if (i4 != 0) {
          break label532;
        }
        d8 = paramg_.a(localhb.a());
        do
        {
          double d10;
          do
          {
            if (localz.size() <= 0) {
              break;
            }
            if (bool) {
              break label262;
            }
            if (((Double)localz.get(0)).doubleValue() > d8 + 1.0E-006D) {
              break;
            }
            d9 = ((Double)localz.remove(0)).doubleValue();
            i1++;
            i2--;
            d10 = a(i1, i3, i2) + a(d9, d1, d2, d3, d4);
          } while (d10 >= d6);
          d6 = d10;
          d5 = d9;
          if (bool) {
            break label262;
          }
          if (bool) {
            break label341;
          }
          if (i4 != 0) {
            break label332;
          }
          if (bool) {
            break label262;
          }
        } while (i4 == 0);
        if (!bool)
        {
          if (d8 > d1 + 1.0E-006D)
          {
            d9 = a(i1, i3, i2) + a(d8, d1, d2, d3, d4);
            if (bool) {
              break label330;
            }
            if (d9 < d6)
            {
              d6 = d9;
              d5 = d8;
            }
          }
          i2++;
          i3--;
        }
        d9 = paramg_.c(localhb.a());
        if (bool) {
          break label426;
        }
        if (d9 + 1.0E-006D >= d2) {
          break;
        }
        localv = localz.f();
        do
        {
          if (localv == null) {
            break label395;
          }
          if (i4 != 0) {
            break;
          }
          if (((Double)localv.c()).doubleValue() >= d9) {
            break label395;
          }
          localv = localv.a();
        } while (i4 == 0);
      } while (bool);
      localz.a(new Double(d9), localv);
      localy.f();
    } while (i4 == 0);
    label395:
    label426:
    label429:
    do
    {
      if (bool) {
        break label536;
      }
      do
      {
        if (localz.size() <= 0) {
          break label530;
        }
        double d7 = ((Double)localz.remove(0)).doubleValue();
        i1++;
        i2--;
        d8 = a(i1, i3, i2) + a(d7, d1, d2, d3, d4);
        if (d8 >= d6) {
          break;
        }
        d6 = d8;
        d5 = d7;
        if (bool) {
          break label536;
        }
        if ((!bool) && (i4 != 0)) {
          break label551;
        }
      } while (bool);
    } while (i4 == 0);
    label530:
    label532:
    if (d6 < 1.7976931348623157E+308D) {
      label536:
      return new f_(d5, d6);
    }
    label551:
    return new f_((d2 + d1) / 2.0D, 1.7976931348623157E+308D);
  }
  
  protected double a(int paramInt1, int paramInt2, int paramInt3)
  {
    int n = paramInt1 + paramInt2 + paramInt3;
    return this.l * (paramInt3 / n) + this.m * Math.abs(paramInt1 - paramInt2) / n;
  }
  
  protected double a(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, double paramDouble5)
  {
    boolean bool = sb.e;
    double d1 = paramDouble1 - paramDouble2;
    double d2 = paramDouble3 - paramDouble1;
    double d3 = paramDouble5 - paramDouble4;
    if (!bool) {}
    double d4 = d1 > d3 ? d3 / d1 : d1 / d3;
    if (!bool) {}
    double d5 = d2 > d3 ? d3 / d2 : d2 / d3;
    double d6 = Math.min(d4, d5);
    return (1.0D - d6) * this.o;
  }
  
  private mb a(mb parammb, z paramz1, z paramz2, t paramt)
  {
    boolean bool = sb.e;
    int n = sb.d;
    if (!bool) {
      if (paramz1.size() != paramz2.size()) {
        throw new IllegalArgumentException("Number of obstacles in horizontal and vertical list have to be identical");
      }
    }
    e locale1 = (e)this.h.get(parammb);
    e locale2 = this.f.i();
    this.f.a(locale1, locale2);
    mb localmb1 = new mb(paramt, this);
    this.g.a(locale2, localmb1);
    this.h.put(localmb1, locale2);
    if (a(localmb1, paramz1))
    {
      locale_1 = new e_(localmb1, false, paramz1, paramz2);
      localObject1 = paramz1.h();
      do
      {
        if (!((y)localObject1).e()) {
          break;
        }
        localObject2 = (hb)((y)localObject1).j();
        if (bool) {
          break label347;
        }
        localObject3 = (List)this.j.get(localObject2);
        ((List)localObject3).add(localmb1);
        ((y)localObject1).f();
        if (n != 0) {
          break label343;
        }
      } while (n == 0);
    }
    e_ locale_1 = new e_(localmb1, true, paramz1, paramz2);
    Object localObject1 = paramz1.h();
    if (((y)localObject1).e()) {}
    while (bool)
    {
      localObject2 = (hb)((y)localObject1).j();
      localObject3 = (List)this.i.get(localObject2);
      if (n != 0) {
        break label353;
      }
      if (localObject3 == null)
      {
        localObject3 = new ArrayList();
        this.i.put(localObject2, localObject3);
      }
      ((List)localObject3).add(localmb1);
      ((y)localObject1).f();
      if (n == 0) {
        break;
      }
    }
    this.k.put(localmb1, locale_1);
    label343:
    label347:
    label353:
    localObject1 = (e_)this.k.get(parammb);
    Object localObject2 = new ArrayList(((e_)localObject1).g.size() + ((e_)localObject1).h.size());
    ((List)localObject2).addAll(((e_)localObject1).g);
    ((List)localObject2).addAll(((e_)localObject1).h);
    Object localObject3 = ((List)localObject2).iterator();
    label535:
    label540:
    label586:
    do
    {
      do
      {
        mb localmb2;
        do
        {
          do
          {
            if (!((Iterator)localObject3).hasNext()) {
              break;
            }
            localmb2 = (mb)((Iterator)localObject3).next();
          } while (!a(localmb2, localmb1));
          e_ locale_2 = (e_)this.k.get(localmb2);
          if ((bool) || ((!bool) && (n != 0))) {
            break label600;
          }
          if (!bool) {
            if (locale_1.b)
            {
              locale_2.g.add(localmb1);
              if (bool) {
                break label540;
              }
              if (n == 0) {
                break label535;
              }
            }
          }
          locale_2.h.add(localmb1);
          if (bool) {
            break label586;
          }
          if (!locale_2.b) {
            break;
          }
          locale_1.g.add(localmb2);
          if (bool) {
            break label586;
          }
        } while (n == 0);
        locale_1.h.add(localmb2);
      } while (bool);
    } while (n == 0);
    d(localmb1);
    label600:
    return localmb1;
  }
  
  public List c(mb parammb)
  {
    boolean bool = sb.e;
    int i1 = sb.d;
    e_ locale_ = (e_)this.k.get(parammb);
    do
    {
      for (;;)
      {
        if (locale_.h.size() > 0)
        {
          Object[] arrayOfObject = locale_.h.toArray();
          int n = 0;
          if (n < arrayOfObject.length)
          {
            mb localmb = (mb)arrayOfObject[n];
            e(localmb);
            n++;
            if ((!bool) && ((i1 == 0) && (i1 == 0))) {
              break;
            }
          }
        }
      }
    } while (bool);
    return locale_.g;
  }
  
  public List a(mb parammb)
  {
    e_ locale_ = (e_)this.k.get(parammb);
    if (!sb.e) {
      if (locale_.d == null) {
        return Collections.EMPTY_LIST;
      }
    }
    return locale_.d;
  }
  
  public List a(hb paramhb)
  {
    boolean bool = sb.e;
    int i1 = sb.d;
    do
    {
      List localList = (List)this.j.get(paramhb);
      int n;
      while (n >= localObject.length)
      {
        if (localList.isEmpty()) {
          break;
        }
        localObject = localList.toArray();
        n = 0;
      }
      if (bool) {
        break label90;
      }
      if (i1 != 0) {
        break label104;
      }
      e((mb)localObject[n]);
      n++;
    } while ((!bool) && ((i1 == 0) && (i1 == 0)));
    label90:
    if (!bool) {}
    label104:
    Object localObject = (List)this.i.get(paramhb);
    if ((bool) || (localObject == null)) {
      return Collections.EMPTY_LIST;
    }
    return new ArrayList((Collection)localObject);
  }
  
  public List a(t paramt)
  {
    boolean bool = sb.e;
    int n = sb.d;
    z localz1 = new z();
    z localz2 = new z();
    localz2.add(this.e);
    label148:
    do
    {
      for (;;)
      {
        if (!localz2.isEmpty())
        {
          mb localmb1 = (mb)localz2.remove(0);
          e_ locale_ = (e_)this.k.get(localmb1);
          if (t.a(localmb1.h(), paramt))
          {
            if (!bool) {
              if (locale_.b)
              {
                localz1.add(localmb1);
                if (!bool) {
                  if (n == 0) {
                    continue;
                  }
                }
              }
              else
              {
                if (bool) {
                  break label148;
                }
              }
            }
            if (!locale_.c) {
              e(localmb1);
            }
            e locale1 = (e)this.h.get(localmb1);
            w localw = locale1.q();
            if (localw.e())
            {
              e locale2 = localw.d();
              mb localmb2 = (mb)this.g.get(locale2);
              if (bool) {
                break label232;
              }
              localz2.add(localmb2);
              localw.f();
              if ((n == 0) && (n == 0)) {
                break;
              }
            }
          }
        }
      }
    } while (bool);
    label232:
    return localz1;
  }
  
  public t b()
  {
    return (sb.e) || (this.e != null) ? this.e.h() : null;
  }
  
  List a(boolean paramBoolean)
  {
    ArrayList localArrayList = new ArrayList();
    a(this.e, localArrayList, paramBoolean);
    return localArrayList;
  }
  
  private void a(mb parammb, List paramList, boolean paramBoolean)
  {
    boolean bool = sb.e;
    int n = sb.d;
    e_ locale_ = (e_)this.k.get(parammb);
    if (!bool)
    {
      if (!locale_.b)
      {
        if (bool) {
          break label88;
        }
        if (!paramBoolean)
        {
          if (bool) {
            break label88;
          }
          if (locale_.c) {}
        }
      }
      else
      {
        paramList.add(parammb);
      }
    }
    else
    {
      if (bool) {
        break label88;
      }
      if (n == 0) {
        return;
      }
    }
    if (!bool) {
      if (!locale_.c) {
        label88:
        e(parammb);
      }
    }
    e locale1 = (e)this.h.get(parammb);
    w localw = locale1.q();
    do
    {
      if (!localw.e()) {
        break;
      }
      e locale2 = localw.d();
      mb localmb = (mb)this.g.get(locale2);
      a(localmb, paramList, paramBoolean);
      localw.f();
    } while (n == 0);
  }
  
  private static boolean a(mb parammb1, mb parammb2)
  {
    boolean bool = sb.e;
    int i2 = sb.d;
    double d1 = parammb1.i();
    double d2 = parammb1.k();
    double d3 = parammb2.i();
    double d4 = parammb2.k();
    int n = 2;
    if (!bool)
    {
      if (Math.abs(d2 - d3) >= 1.0E-006D)
      {
        if (bool) {
          break label93;
        }
        if (Math.abs(d1 - d4) >= 1.0E-006D) {}
      }
      else
      {
        n = 0;
      }
    }
    else {
      if ((!bool) && (i2 == 0)) {
        break label140;
      }
    }
    label93:
    if (!bool)
    {
      if (d3 <= d2)
      {
        if (bool) {
          break label138;
        }
        if (d1 <= d3) {}
      }
      else
      {
        if (bool) {
          break label144;
        }
      }
    }
    else
    {
      if (d1 > d4) {
        break label140;
      }
      if (bool) {
        break label144;
      }
      if (d3 > d1) {
        break label140;
      }
    }
    label138:
    n = 1;
    label140:
    label144:
    double d5 = parammb1.j();
    double d6 = parammb1.l();
    double d7 = parammb2.j();
    double d8 = parammb2.l();
    int i1 = 2;
    if (!bool)
    {
      if (Math.abs(d6 - d7) >= 1.0E-006D)
      {
        if (bool) {
          break label225;
        }
        if (Math.abs(d5 - d8) >= 1.0E-006D) {}
      }
      else
      {
        i1 = 0;
      }
    }
    else
    {
      if (bool) {
        break label277;
      }
      if (i2 == 0) {
        break label275;
      }
    }
    label225:
    if (!bool) {
      if (d7 <= d6)
      {
        if (bool) {
          break label273;
        }
        if (d5 <= d7) {
          break label272;
        }
      }
    }
    if (!bool) {
      if (d5 <= d8)
      {
        if (bool) {
          break label277;
        }
        if (d7 <= d5) {
          label272:
          label273:
          i1 = 1;
        }
      }
    }
    label275:
    label277:
    if (!bool) {
      if (n == 1)
      {
        if (bool) {
          break label318;
        }
        if (i1 == 0) {
          break label317;
        }
      }
    }
    if ((bool) || (n == 0)) {
      if (bool) {}
    }
    label317:
    label318:
    return i1 == 1;
  }
  
  boolean f()
  {
    boolean bool = sb.e;
    int i3 = sb.d;
    t localt1 = this.e.h();
    t localt2 = new t(localt1.d - 1.0E-006D, localt1.e - 1.0E-006D, localt1.a + 2.0E-006D, localt1.b + 2.0E-006D);
    List localList = a(false);
    int n = 1;
    int i1 = 1;
    z localz = new z();
    double d1 = 0.0D;
    Object localObject = localList.iterator();
    label90:
    label97:
    do
    {
      break label299;
      break label299;
      break label299;
      if (!((Iterator)localObject).hasNext()) {
        break;
      }
      mb localmb1 = (mb)((Iterator)localObject).next();
      d1 += localmb1.n() * localmb1.m();
      localz.add(new c_(localmb1));
      if (!bool) {
        if (!localt2.b(localmb1.h()))
        {
          System.out.println("Cell " + localmb1.f() + " leaves the border!");
          n = 0;
        }
      }
      e_ locale_1 = (e_)this.k.get(localmb1);
      if ((bool) || (!locale_1.h.isEmpty())) {
        i1 = 0;
      }
      ArrayList localArrayList = new ArrayList(locale_1.g.size() + locale_1.h.size());
      localArrayList.addAll(locale_1.g);
      localArrayList.addAll(locale_1.h);
      Iterator localIterator = localArrayList.iterator();
      do
      {
        if (!localIterator.hasNext()) {
          break label90;
        }
        mb localmb2 = (mb)localIterator.next();
        e_ locale_2 = (e_)this.k.get(localmb2);
        if (bool) {
          break label157;
        }
        if (!bool) {
          if (locale_1.b)
          {
            if (bool) {
              continue;
            }
            if (!locale_2.g.contains(localmb1)) {
              break label408;
            }
          }
        }
        if (locale_1.b) {
          break;
        }
        if ((bool) || (i3 != 0)) {
          break label97;
        }
        if (locale_2.h.contains(localmb1)) {
          break;
        }
        i1 = 0;
      } while (bool);
    } while (i3 == 0);
    label157:
    label299:
    localObject = new d_();
    label408:
    m.a(localz, (m.g_)localObject);
    double d2 = localt1.a * localt1.b;
    int i2 = 1;
    if (!bool) {
      if (Math.abs(d2 - d1) > 1.0E-006D)
      {
        System.out.println("Grid area is inconsistent!");
        i2 = 0;
      }
    }
    if (((bool) || (i2 != 0)) && ((bool) || (n != 0)) && ((bool) || (!((d_)localObject).a()))) {
      if (bool) {}
    }
    return i1 != 0;
  }
  
  private static boolean a(c_ paramc_1, c_ paramc_2)
  {
    t localt1 = paramc_1.a();
    t localt2 = new t(localt1.d() + 1.0E-006D, localt1.e() + 1.0E-006D, localt1.b() - 2.0E-006D, localt1.c() - 2.0E-006D);
    return t.a(localt2, paramc_2.a());
  }
  
  static class c_
    implements p
  {
    private final mb a;
    
    c_(mb parammb)
    {
      this.a = parammb;
    }
    
    public t a()
    {
      return this.a.h();
    }
    
    public String toString()
    {
      return this.a.f() + " (" + this.a.h() + ")";
    }
  }
  
  class d_
    implements m.g_
  {
    private boolean a = false;
    
    d_() {}
    
    public boolean a()
    {
      return this.a;
    }
    
    public void a(Object paramObject1, Object paramObject2)
    {
      l.c_ localc_1 = (l.c_)paramObject1;
      l.c_ localc_2 = (l.c_)paramObject2;
      if (!sb.e)
      {
        if (l.a(localc_1, localc_2)) {
          System.out.println("Found intersection partition cells (cell " + localc_1 + " and " + localc_2 + ")");
        }
      }
      else {
        this.a = true;
      }
    }
  }
  
  static class e_
  {
    mb a;
    boolean b;
    boolean c;
    z d;
    z e;
    List g;
    List h;
    
    e_(mb parammb, boolean paramBoolean, z paramz1, z paramz2)
    {
      this.d = paramz1;
      this.e = paramz2;
      this.a = parammb;
      this.g = new z();
      this.h = new z();
      this.b = paramBoolean;
      this.c = false;
    }
    
    void a()
    {
      this.d = null;
      this.e = null;
      this.g = null;
      this.h = null;
    }
    
    void b()
    {
      boolean bool = sb.e;
      int i = sb.d;
      StringBuffer localStringBuffer = new StringBuffer();
      if (!bool)
      {
        if (this.a != null)
        {
          localStringBuffer.append("Id: ");
          localStringBuffer.append(this.a.f());
          localStringBuffer.append(", ");
        }
        localStringBuffer.append("Leaf: ");
        localStringBuffer.append(this.b);
      }
      Iterator localIterator;
      mb localmb;
      if (!bool) {
        if (this.g != null)
        {
          localStringBuffer.append(", Neighbors(");
          localStringBuffer.append(this.g.size());
          localStringBuffer.append("): ");
          localIterator = this.g.iterator();
          do
          {
            do
            {
              do
              {
                if (!localIterator.hasNext()) {
                  break;
                }
                localmb = (mb)localIterator.next();
                localStringBuffer.append(localmb.f());
              } while (!localIterator.hasNext());
              localStringBuffer.append(", ");
              if (bool) {
                break label247;
              }
              if ((!bool) && (i != 0)) {
                return;
              }
            } while (bool);
          } while (i == 0);
        }
      }
      if (!bool)
      {
        if (this.h != null)
        {
          localStringBuffer.append(", Neighbor candidates(");
          localStringBuffer.append(this.h.size());
          localStringBuffer.append("): ");
        }
      }
      else
      {
        localIterator = this.h.iterator();
        label247:
        do
        {
          do
          {
            do
            {
              if (!localIterator.hasNext()) {
                break;
              }
              localmb = (mb)localIterator.next();
              localStringBuffer.append(localmb.f());
            } while (!localIterator.hasNext());
            localStringBuffer.append(", ");
            if ((bool) || ((!bool) && (i != 0))) {
              return;
            }
          } while (bool);
        } while (i == 0);
      }
      System.out.println(localStringBuffer.toString());
    }
  }
  
  static class f_
  {
    final double a;
    final double c;
    
    f_(double paramDouble1, double paramDouble2)
    {
      this.a = paramDouble1;
      this.c = paramDouble2;
    }
  }
  
  static class i_
    implements l.g_
  {
    public double d(t paramt)
    {
      return paramt.d();
    }
    
    public double f(t paramt)
    {
      return paramt.d() + paramt.b();
    }
    
    public double a(t paramt)
    {
      return paramt.e();
    }
    
    public double c(t paramt)
    {
      return paramt.e() + paramt.c();
    }
  }
  
  static class h_
    implements l.g_
  {
    public double a(t paramt)
    {
      return paramt.d();
    }
    
    public double c(t paramt)
    {
      return paramt.d() + paramt.b();
    }
    
    public double d(t paramt)
    {
      return paramt.e();
    }
    
    public double f(t paramt)
    {
      return paramt.e() + paramt.c();
    }
  }
  
  static abstract interface g_
  {
    public abstract double a(t paramt);
    
    public abstract double c(t paramt);
    
    public abstract double d(t paramt);
    
    public abstract double f(t paramt);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.l.a.l

 * JD-Core Version:    0.7.0.1

 */